package com.hdit.entity;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * 实体类 - 用户
 * ============================================================================
 */

@Entity
public class Users {

	public static final String LOGIN_ID_SESSION_NAME = "loginUserId";// 保存登录会员ID的Session名称
	public static final String LOGIN_USERNAME_COOKIE_NAME = "loginUsername";// 保存登录会员用户名的Cookie名称
	public static final String LOGIN_REDIRECTION_URL_SESSION_NAME = "redirectionUrl";// 保存登录来源URL的Session名称
	public static final String PASSWORD_RECOVER_KEY_SEPARATOR = "_";// 密码找回Key分隔符
	public static final int PASSWORD_RECOVER_KEY_PERIOD = 10080;// 密码找回Key有效时间（单位：分钟）
	
	
	private String username;// 用户名
	private String password;// 密码
	private String email;// E-mail
	
	@Column(updatable = false, nullable = false, unique = true)
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(nullable = false)
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	@Column(nullable = false)
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
}